package com.mzj.saas.mservice.property.repository;

import com.mzj.saas.mservice.property.entity.MatchUser;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

import java.util.List;

public interface MatchUserRepository extends PagingAndSortingRepository<MatchUser,Long>, JpaSpecificationExecutor<MatchUser>, JpaRepository<MatchUser, Long> {
    public MatchUser findByPhoneAndDeleteStatus(String phone, Boolean deleteStatus);

    public MatchUser findByMatchUserId(String matchUserId);

    MatchUser findByPhone(String mobile);
    MatchUser findByIdAndDeleteStatus(Long Id,Boolean deleteStatus);
    @Query(value = "select * from m_match_user_stock where match_user_id = ?1",nativeQuery = true)
    List<MatchUser> findByUserId(String matchUserId);

}
